package com.zhuwhao.sample;

import android.support.annotation.LayoutRes;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;

import com.jaeger.library.StatusBarUtil;
import com.r0adkll.slidr.Slidr;
import com.r0adkll.slidr.model.SlidrConfig;

/**
 * Created by zhuwh on 2016/12/10 0010.
 * BaseActivity
 */
public class BaseActivity extends AppCompatActivity {

    @Override
    public void setContentView(@LayoutRes int layoutResID) {
        super.setContentView(layoutResID);
        Slidr.attach(this, new SlidrConfig.Builder().edge(true).build());
        setStatusBar();
    }

    /**
     * 设置状态栏颜色及透明度
     */
    protected void setStatusBar() {
        StatusBarUtil.setColorForSwipeBack(this, ContextCompat.getColor(this, R.color.colorPrimary), 0);
    }
}